package com.zs.zcerp.entrance.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 部门表实体类
 */
@Data
@TableName("DP_DEPT")
public class DpDept implements Serializable {

    @TableField("ORG_ID")
    @JSONField(name="org_id")
    private Integer orgId;

    @TableField("DEPT_NO")
    @JSONField(name="dept_no")
    private String deptNo;

    @TableField("HIGH_DEPT")
    @JSONField(name="high_dept")
    private String highDept;

    /**
     * 部门Id
     * dept_id = org_id + dept_no
     */
    @TableField(exist = false)
    @JSONField(name="dept_id")
    private String deptId;

    /**
     * 部门名称
     */
    @TableField("NAME_T")
    private String name;

    /**
     * 父部门ID，根部门为0
     * parent_id = org_id + high_dept
     */
    @TableField(exist = false)
    @JSONField(name="parent_id")
    private String parentId;

    @TableField(exist = false)
    private String order;

    @TableField("LAST_DATE")
    private String lastDate;
}
